<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Prime Number Check</title>
</head>
<body>
<%
    int num = Integer.parseInt(request.getParameter("num"));
    boolean isPrime = true;
    for (int i = 2; i < num; i++) {
        if (num % i == 0) {
            isPrime = false;
            break;
        }
    }
    if (isPrime) {
        out.print(num + " 是素数。");
    } else {
        out.print(num + " 不是素数。");
    }
%>
</body>
</html>
